package com.his.his_system.controller.VisitController;

import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.his.his_system.common.util.ResultAdvice;
import com.his.his_system.controller.VisitController.ZFB.AliPayController;
import com.his.his_system.domain.DzmHisCarePkg;
import com.his.his_system.domain.DzmHisRegistration;
import com.his.his_system.service.DefaultService;
import com.his.his_system.service.DzmHisCarePkgService;
import com.his.his_system.service.DzmHisRegistrationService;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;

/**
 * 挂号列表
 */
@RestController
@RequestMapping("/his/sad/registerlist/")
public class RegisterlistController {

    @Resource
    private DefaultService defaultService;

    @Resource
    private DzmHisRegistrationService dzmHisRegistrationService;

    @Resource
    private DzmHisCarePkgService dzmHisCarePkgService;
    /**
     * 获取挂号列表
     * @return
     */
    @GetMapping("getRegisterlist")
    public ResultAdvice<List<DzmHisRegistration>> getRegisterlist(){
        return ResultAdvice.success(defaultService.getAllRegisters(),"成功");
    }

    /**
     * 根据患者姓名模糊查询
     * @param patientName
     * @return
     */
    @GetMapping("getRegisterlistByname")
    public ResultAdvice<List<DzmHisRegistration>> getRegisterlistByname(String patientName){
        return ResultAdvice.success(defaultService.getRegisterlistByname(patientName),"成功");
    }

}
